<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<table class="table">

    <tr>
        <td>
            <a href="/home/home/recycling">回收站</a>
        </td>
    </tr>

    <tr>
        <form>
            <input type="text" name="word" placeholder="请输入您想要查询的信息...">
            <input type="submit" value="查询">
        </form>
        >
    </tr>
    <tr>
        <th>ID</th>
        <th>订单编号</th>
        <th>下单日期</th>
        <th>收货人</th>
        <th>支付方式</th>
        <th>总金额</th>
        <th>订单状态</th>
        <th>操作</th>
    </tr>
    {foreach $data as $k=>$v}
    <tr class="success">
        <td>{$v.id}</td>
        <td>{$v.o_order_id}</td>
        <td>{$v.o_order_time}</td>
        <td>{$v.o_consignee}</td>
        <td>{$v.o_mode}</td>
        <td>{$v.o_amount}</td>
        <td>
            {if $v.o_state==1}
            <a href="#">
                未付款
            </a>
            {/if}
            {if $v.o_state==2}
            <a href="#">
                已付款
            </a>
            {/if}
            {if $v.o_state==3}
            <a href="#">
                未发货
            </a>
            {/if}
            {if $v.o_state==4}
            <a href="#">
                已发货
            </a>
            {/if}
        </td>
        <td>
            <a href="/home/home/del?id={$v.id}">删除</a>
        </td>
    </tr>
    {/foreach}
    <span><a href="#" onclick="unclear()">清除redis缓存</a></span>
</table>
{$data->render()}
<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js">
</script>
<script>
    function unclear() {
        $.ajax({
            'url': "http://www.admin.com/home/Show/unclear",
            'dataType': 'JSON',
            'type': 'GET',
            success: function (e) {
                alert('清除成功')
            }
        })
    }
</script>
